package com.axjy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axjy.mapper.ManagerMapper;
import com.axjy.pojo.Manager;
import com.axjy.service.ManagerService;

@Service("managerService")
@Transactional
public class ManagerServiceImpl implements ManagerService{

	@Resource
	private ManagerMapper managerMapper;
	
	@Override
	public Manager getManager(String mgName, String mgPWD) {
		return managerMapper.getManager(mgName, mgPWD);
	}

	@Transactional(readOnly=true)
	@Override
	public List<Manager> list() {
		return managerMapper.list();
	}

	@Override
	public Integer add(Manager entity) {
		return managerMapper.add(entity);
	}

	@Override
	public Integer del(Integer id) {
		return managerMapper.del(id);
	}

	@Override
	public Integer update(Manager entity) {
		return managerMapper.update(entity);
	}

	@Override
	public Manager get(Integer id) {
		return managerMapper.get(id);
	}

	@Override
	public Integer batchDel(Integer[] ids) {
		return null;
	}

	@Override
	public List<Manager> searchByPager(Integer offset, Integer limit) {
		
		return managerMapper.searchByPager(offset, limit);
	}

	@Override
	public Integer getTotalByPager() {
		return managerMapper.getTotalByPager();
	}




	
	
}
